package com.ziki.test.mail;

import java.util.List;

import org.subethamail.wiser.Wiser;
import org.subethamail.wiser.WiserMessage;

import com.ziki.common.util.io.Out;

public class MailServer {

    /**
     * @param args
     */
    public static void main(String[] args) {
        Wiser server = new Wiser();
        server.setPort(25);
        server.setHostname("locolhost");
        server.start();
        // NewUpdate.main(null);
        server.stop();
        List<WiserMessage> msg = server.getMessages();
        if (msg != null && msg.size() > 0) {
            for (WiserMessage wmsg : msg) {
                Out.println(wmsg.getEnvelopeReceiver());
                // Common.println(wmsg.getEnvelopeSender());
            }
        } else {
            Out.println("nulllllllllllllllllllll");
        }
    }

}
